<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>按天包车管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
			return false;
		}
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/rentproduct/tRentproduct/rentproductForDayList">按天包车列表</a></li>
		<shiro:hasPermission name="rentproduct:tRentproduct:edit">
			<li>
				<a href="${ctx}/rentproduct/tRentproduct/rentproductForDayForm">按天包车添加</a>
			</li>
		</shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="tRentproduct" action="${ctx}/rentproduct/tRentproduct/rentproductForDayList" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<div>
			<label>出发城市：</label>
			<select name="departcity.siteid" class="input-large">
				<option value="">无</option>
				<c:forEach items="${siteList }" var="site">
					<option value="${site.siteid }" ${tRentproduct.departcity.siteid == site.siteid?"selected":"" }>${site.sitename }</option>
				</c:forEach>
			</select>
			<label>租赁起期：</label>
			<input name="fromdate" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
				value="<fmt:formatDate value="${tRentproduct.fromdate}" pattern="yyyy-MM-dd"/>"
				onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
		</div>
		<div style="margin-top:8px;">
			<label>到达城市：</label>
			<select name="destcity.siteid" class="input-large">
				<option value="">无</option>
				<c:forEach items="${siteList }" var="site">
					<option value="${site.siteid }" ${tRentproduct.destcity.siteid == site.siteid?"selected":"" }>${site.sitename }</option>
				</c:forEach>
			</select>
			<label>租赁止期：</label>
			<input name="stopdate" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
				value="<fmt:formatDate value="${tRentproduct.stopdate}" pattern="yyyy-MM-dd"/>"
				onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
			<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
		</div>
	</form:form>
	<sys:message content="${message}"/>
	<table class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>产品名称</th>
				<th>车型</th>
				<th>出发城市</th>
				<th>到达城市</th>
				<th>车辆数</th>
				<th>审核结果</th>
				<shiro:hasPermission name="rentproduct:tRentproduct:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="tRentproduct">
			<tr>
				<td>
					<a href="${ctx}/rentproduct/tRentproduct/rentproductForDayForm?rentid=${tRentproduct.rentid}">
						${tRentproduct.productname}
					</a>
				</td>
				<td>
				${tRentproduct.cargotype.typename }
				</td>
				<td>
					${tRentproduct.departcity.sitename}
				</td>
				<td>
					${tRentproduct.destcity.sitename}
				</td>
				<td>
					${tRentproduct.vehiclenum}辆
				</td>
				<td>
					${tRentproduct.auditstatus == '1'?'通过':''}
					<c:if test="${tRentproduct.auditstatus == '2' }">
						<a href="${ctx}/rentproduct/tRentproductAudit/reason?rentproduct.rentid=${tRentproduct.rentid}">不通过</a>
					</c:if>
					${tRentproduct.auditstatus == '3'?'待审核':''}
					${tRentproduct.auditstatus == '9'?'已停用':''}
				</td>
				<shiro:hasPermission name="rentproduct:tRentproduct:edit">
					<td>
						<a href="${ctx}/rentproduct/tRentproduct/rentproductForDayForm?rentid=${tRentproduct.rentid}">查看</a>
						<a href="${ctx}/rentproduct/tRentprodModify/rentproductForDayList?rentid=${tRentproduct.rentid}">调整</a>
						<a href="${ctx}/rentproduct/tRentproduct/rentproductForDayDelete?rentid=${tRentproduct.rentid}" onclick="return confirmx('确认要删除该按天包车吗？', this.href)">删除</a>
					</td>
				</shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>